#!/bin/sh

# have runed on 2012-10-20

n=1
d=`date -d "-$n day" +"%Y %m %d"`
today="2012 03 13"

while [ "$d" != "$today" ]; do
    echo $d

    ./kpi_day.py $d
    ./cat_data.py $d
    ./city_data.py $d
    ./product_data.py $d
    ./product_property.py $d

    for hour in `seq 0 23`; do
        echo $d $hour
        ./kpi_hour.py $d $hour
    done

    n=`expr $n + 1`
    d=`date -d "-$n day" +"%Y %m %d"`
done

